<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-on修饰符</title>
		<script src="../../vue/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
		
			<div id="myClick" @click="divClick()"><!-- 这里会产生冒泡  如果不让父类发生  则可以用修饰符.stop -->
				<button type="button" @click.stop="btnClick()">按钮</button>
			</div>
			<!-- 键盘事件 -->
			<input type="text" name="" id="keyup" @keyup="keyUp()" />
			<!-- .once修饰符   只能点击一次 -->
			<input type="text" name="" id="keyup" @keyup.once="keyUp()" />
		</div>
		<script type="text/javascript">
			var app = new Vue({
				el:'#app',
				data:{
					message:'xie'
				},
				methods:{
					btnClick(){
						console.log('btnClick');
					},
					divClick(){
						console.log('divClick');
					} ,
					keyUp(){
						console.log("keyup");
					}
				}
			});
		</script>
	</body>
</html>
